<style>
#artikli_boje table tr:hover{
	background:{{$highlight}};
	color:{{$highlighttext}};
}
#artikli_boje table td input[type=button]{
	width:16px;
	height:16px;
	padding:0px;
	background-color:transparent;
	border:none;
	margin:0px 2px;
	cursor:pointer;
}
#artikli_boje table td input[type=button]:hover{
	background-color:#fff;
}
</style>
<div class="area" id="artikli_boje">
	<h2>Boje artikala</h2>
	<input type="button" class="refresh" value="osveži" onclick="LoadRSDoc('artikli.php?a=artikli_boje','setContent')" />
	<input type="button" class="novi" value="nova boja" onclick="var nn=trim(prompt('Naziv boje:')); var nc=trim(prompt('Kôd nove boje:')); if(nn.length && nc.length){LoadRSDoc('artikli.php?a=artikli_boje&mod=save&name='+escape(nn)+'&code='+escape(nc),'afterSaveArtiklGroup(\'artikli_boje\')')}" /><br clear="all" />
	<table>
		<tr class="head">
			<td>šifra</td>
			<td>naziv</td>
			<td>kôd</td>
			<td></td>
		</tr>
		{{%loop start color_id}}
		<tr>
			<td>{{$color_id}}</td>
			<td>{{$color_name}}</td>
			<td>{{$color_code}}</td>
			<td>
				<input title="izmeni" type="button" class="edit" onclick="var nn=trim(prompt('Novi naziv za boju #{{$color_id}}&nbsp({{$color_name}})','{{$color_name}}')); var nc=trim(prompt('Novi kôd za boju #{{$color_id}}&nbsp;({{$color_code}})','{{$color_code}}')); if(nn.length && nc.length){LoadRSDoc('artikli.php?a=artikli_boje&mod=save&id={{$color_id}}&name='+escape(nn)+'&code='+escape(nc),'afterSaveArtiklGroup(\'artikli_boje\')')}" />
				<input title="obriši" type="button" class="delete" onclick="if({{$color_id}}>0 && confirm('Da li želite da obrišete boju \'{{$color_name}}\'?')){LoadRSDoc('artikli.php?a=artikli_boje&mod=delete&id={{$color_id}}','afterSaveArtiklGroup(\'artikli_boje\')')}" />
			</td>
		</tr>
		{{%loop end}}
	</table>
</div>